import { version1, userLoginApi } from '../src/api';

const delay = (ms: number) =>
  new Promise(resolve => {
    setTimeout(resolve, ms);
  });

export default {
  // 1. 登录
  [`POST ${version1}${userLoginApi}`]: (req: any, res: any) => {
    delay(1000);
    res.send({
      data: {
        account: '17584578945',
        name: '张三',
        token:
          'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ',
      },
      message: '',
      request_id: '56e83d08ea1e4c209af9b857c2a9abf8',
    });
  },
};
